//部门列表      模型

//引入mongoose模块
const mongoose = require('mongoose');
const { Schema } = mongoose;

//创建deptSchema数据库模型
const deptSchema = new Schema({
    deptId: [mongoose.Types.ObjectId],//deptId: [ null ]这种格式
    userId: String,
    deptName: String,
    userName: String,
    userEmail: String,
    createTime: {
        type: Date,
        default: Date.now
    },
    updateTime: {
        type: Date,
        default: Date.now
    },
});

//定义dept模型并导出
module.exports = mongoose.model('dept', deptSchema)